/*
Copyright [2020] [https://www.xiaonuo.vip]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：

1.请不要删除和修改根目录下的LICENSE文件。
2.请不要删除和修改Snowy源码头部的版权声明。
3.请保留源码和相关描述文件的项目出处，作者声明等。
4.分发源码时候，请注明软件出处 https://gitee.com/xiaonuobase/snowy
5.在修改包名，模块名称，项目代码等时，请注明软件出处 https://gitee.com/xiaonuobase/snowy
6.若您的项目无法满足以上几点，可申请商业授权，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package vip.xiaonuo.modular.questionnaire.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import vip.xiaonuo.core.pojo.base.param.BaseParam;
import vip.xiaonuo.modular.questionnairedetail.entity.QuestionnaireDetail;
import vip.xiaonuo.modular.screendetail.entity.ScreenDetail;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
* 问卷列表参数类
 *
 * @author blueberry
 * @date 2021-08-25 22:27:08
*/
@ApiModel("问卷列表参数类")
@Data
public class QuestionnaireParam extends BaseParam {

    /**
     * 
     */
    @NotNull(message = "不能为空，请检查id参数", groups = {edit.class, delete.class, detail.class})
    private Long id;

    /**
     * 类型
     */
    @ApiModelProperty("类型")
    @NotBlank(message = "类型不能为空，请检查type参数", groups = {add.class, edit.class})
    private String type;

    /**
     * 问卷列表名称
     */
    @ApiModelProperty("问卷列表名称")
    @NotBlank(message = "问卷列表名称不能为空，请检查name参数", groups = {add.class, edit.class})
    private String name;

    /**
     * 是否为甄选问卷
     */
    @ApiModelProperty("是否为甄选问卷")
    @NotNull(message = "是否为甄选问卷不能为空，请检查other参数", groups = {add.class, edit.class})
    private Integer other;

    @ApiModelProperty("截止日期")
    @NotNull(message = "截止日期不能为空，请检查expirationDate参数", groups = {add.class, edit.class})
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date expirationDate;

    @ApiModelProperty("用户手机号")
    @NotNull(message = "用户手机号不能为空，请检查userId参数", groups = {edit.class, delete.class, detail.class})
    private Long userId;

    /**
     * 状态，待领取0，待完成1，已上架2，
     */
    @ApiModelProperty("状态")
    @NotNull(message = "状态不能为空，请检查status参数", groups = {edit.class, delete.class, detail.class})
    private Short status;

    /**
     * 填写份数
     */
    @ApiModelProperty("填写份数")
    @NotNull(message = "填写份数不能为空，请检查sum参数", groups = {add.class, edit.class})
    private Integer sum;

    /**
     * 是否上架（0-否，1-是）
     */
    @ApiModelProperty("是否上架（0-否，1-是）")
    @NotNull(message = "是否上架（0-否，1-是）不能为空，请检查upShelf参数", groups = {add.class, edit.class})
    private Integer upShelf;

    /**
     * 费用
     */
    @ApiModelProperty("费用")
    @NotNull(message = "费用不能为空，请检查price参数", groups = {add.class, edit.class})
    private BigDecimal price;

    /**
     * 上级费用
     */
    @ApiModelProperty("上级费用")
    @NotNull(message = "上级费用不能为空，请检查onePrice参数", groups = {add.class, edit.class})
    private BigDecimal onePrice;

    /**
     * 上上级费用
     */
    @ApiModelProperty("上上级费用")
    @NotNull(message = "上上级费用不能为空，请检查twoPrice参数", groups = {add.class, edit.class})
    private BigDecimal twoPrice;

    /**
     * 已填份数
     */
    @ApiModelProperty("已填份数")
    @NotNull(message = "已填份数不能为空，请检查filledSum参数", groups = {add.class, edit.class})
    private Integer filledSum;

    /**
     * 是否售卖
     */
    @ApiModelProperty("是否售卖")
    @NotNull(message = "是否售卖不能为空，请检查inSell参数", groups = {add.class, edit.class})
    private Integer inSell;

    /**
     * 甄选问卷详情表
     */
    @ApiModelProperty("甄选问卷详情明细")
    private List<ScreenDetail> screenDetails;

    /**
     * 问卷详情表
     */
    @ApiModelProperty("问卷详情表")
    private List<QuestionnaireDetail> questionnaireDetails;
}
